﻿using Microsoft.AspNetCore.Razor.TagHelpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DotNetStar.TheKing.Web.TagHelpers
{
    [HtmlTargetElement("user-home",TagStructure = TagStructure.NormalOrSelfClosing)]
    public class UserHomeLinkTagHelper:TagHelper
    {
        public long UserId { get; set; }

        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            output.TagName = "a";
            output.Attributes.Add("href", $"/user/{this.UserId}/home");
            output.Attributes.Add("target", "_blank");
        }

    }
}
